package com.example.demo.controller;


import com.example.demo.service.ISecuritiesNews;
import com.example.demo.utils.R;
import com.example.demo.vo.SecuritiesNewsVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "证券快讯模块")
@RestController
@RequestMapping("/securitiesNews")
public class SecuritiesNewsController {

    @Autowired
    private ISecuritiesNews service;

    @ApiOperation("查询数据库内所有证卷快讯的标题+时间")
    @GetMapping("/select")
    public R<List<SecuritiesNewsVo>> select(){
        return R.success("查询证券快讯成功",service.selectSecuritiesNewsList());
    }

}
